package Introspector;

import java.util.HashMap;

public class TestLock {
	  private final HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
	  
	  public TestLock() {
	    final Thread t1 = new Thread() {
	      @Override
	      public void run() {
	        for(int i=0; i<500000; i++) {
	          map.put(new Integer(i), i);
	        }
	        System.out.println("t1 over");
	      }
	    };
	    final Thread t2 = new Thread() {
	      @Override
	      public void run() {
	        for(int i=0; i<500000; i++) {
	          map.put(new Integer(i), i);
	        }
	        System.out.println("t2 over");
	      }
	    };
	    t1.start();
	    t2.start();
	  }
	 
	  public static void main(final String[] args) {
	    new TestLock();
	  }
	}